#include "furniture.h"
#include <iostream>
using namespace std;

namespace iotek {

Weight::Weight() {}
Weight::Weight(int weight) {
  m_weight = weight;
}
void Weight::setWeight(int weight) {
  m_weight = weight;
}
int Weight::getWeight() {
  return m_weight;
}

// Sofa::Sofa(int weight) : m_weight(weight) {}
// Sofa::Sofa(int weight) {} // 这里说明实例化 Sofabed 时，会调用Weight类的无参构造。
Sofa::Sofa(int weight) : Weight(weight) {} // 这里说明实例化 Sofabed 时，会调用Weight类的 int 构造。
// void Sofa::setWeight(int weight) {
//   m_weight = weight;
// }
// int Sofa::getWeight() {
//   return m_weight;
// }
void Sofa::watchTV() {
  cout << "watchTV" << endl;
}

// Bed::Bed(int weight) : m_weight(weight) {}
Bed::Bed(int weight) {}
// void Bed::setWeight(int weight) {
//   m_weight = weight;
// }
// int Bed::getWeight() {
//   return m_weight;
// }
void Bed::sleep() {
  cout << "sleep" << endl;
}

// Sofabed::Sofabed(int weight) : Sofa(weight), Bed(weight) {}
Sofabed::Sofabed(int weight) : Sofa(weight) {}
void Sofabed::foldout() {
  cout << "sofabed foldout" << endl;
}

}